package org.stu.tp.testCases.phoneSetting;

import org.stu.tp.core.DefaultTestCase;

public class TestPhoneTransfer extends DefaultTestCase{
	PhoneTransferAction userAC=new PhoneTransferAction(); 
	
	/**
	 * Note: Assume there is one phone in the list at least.
	 */
	public void testAddOnePhone(){
		String phone;
		
		userAC.loginAndAccessPhoneSetting(selenium);
		userAC.clickAddButton(selenium);
		userAC.selectPhoneByIndex(selenium, 1);
		phone=userAC.getPhoneByIndex(selenium, 1);
		userAC.clickSaveButton(selenium);
		assertTrue(userAC.isPhoneExit(selenium, phone));
		
	}
	
	public void testDeleteOnePhone(){
		String phone="";
		userAC.loginAndAccessPhoneSetting(selenium);
		phone=userAC.getPhoneByOrder(selenium, 1);
		userAC.clickDelteLinkByIndex(selenium, 1);
		selenium.getConfirmation();
		userAC.waitForPageToLoad(selenium);
		assertFalse(selenium.isTextPresent(phone));
		
	}
}
